package com.group4.datafactorybackend.entity.DTO;

import com.group4.datafactorybackend.common.enums.MyEnumClass;
import com.group4.datafactorybackend.common.verify.QsmSpecifiedSelector;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

/**
 * @author 卑微小峰
 * @date 2022/8/1
 * @description 新增、修改目录接收参数实体类 TODO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CreateOrUpdateDirectoryDTO {

    /**
     * 目录编号
     */
    @Length(max = 100, message = "目录编号长度不能超过100")
    private String directoryCode;

    /**
     * 目录名称
     */
    @Length(max = 15, message = "目录名称长度不能超过15")
    private String directoryName;

    /**
     * 父级编号
     */
    @Length(max = 100, message = "目录编号长度不能超过100")
    private String parentCode;

    /**
     * 菜单编号
     */
    @QsmSpecifiedSelector(enumValue = MyEnumClass.MenuEnum.class, message = "错误的菜单编号")
    @Length(max = 5, message = "菜单编号长度不能超过5")
    private Integer menuCode;
}
